package org.sam.beatles.event;

import org.sam.swing.JSPanel;
import org.springframework.context.ApplicationEvent;

/**
 * 打开可停靠窗口的操作
 * 
 * @author sam
 *
 */
public class OpenDockWindowEvent extends ApplicationEvent {

	private static final long serialVersionUID = 67273231196427446L;

	/**
	 * 当前打开窗口的class类型
	 */
	private Class<? extends JSPanel> clz;

	/**
	 * 当前打开窗口的class类型
	 * 
	 * @return
	 */
	public Class<? extends JSPanel> getClz() {
		return clz;
	}

	/**
	 * 当前打开窗口的class类型
	 * 
	 * @param clz
	 */
	public void setClz(Class<? extends JSPanel> clz) {
		this.clz = clz;
	}

	/**
	 * 窗口标题
	 */
	private String title;

	/**
	 * 窗口标题
	 * 
	 * @return
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * 窗口标题
	 * 
	 * @param title
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * 打开可停靠窗口的操作
	 * 
	 * @param source
	 * @param title
	 * @param cls
	 */
	public OpenDockWindowEvent(Object source, String title, Class<? extends JSPanel> cls) {
		super(source);
		this.setTitle(title);
		this.setClz(cls);
	}

}
